﻿#region Header
//************************************************************************************
// Name: AuditInformationInterceptor
// Description: AuditInformationInterceptor
// Created On:  02-Aug-2011
// Created By:  Swathi
// Last Modified On:
// Last Modified By:
// Last Modified Reason:
//*************************************************************************************
#endregion Header
using System;
using NHibernate;
using NHibernate.Type;

namespace Base.Data.Interceptors
{
    /// <summary>
    /// <remarks>Refrence for this implementation is from http://elegantcode.com/2008/05/15/implementing-nhibernate-interceptors/</remarks>
    /// </summary>
    public class AuditInformationInterceptor : EmptyInterceptor
    {
        public override Boolean OnSave(object entity, object id, object[] state, string[] propertyNames, IType[] types)
        {
            return true;
            // Implementation
        }

        public override Boolean OnFlushDirty(object entity, object id, object[] currentState, object[] previousState,
                                             string[] propertyNames, IType[] types)
        {
            // Implementation
            return true;
        }
    }
}